package com.flyduck.vueshop.order.admin.vo;

import com.flyduck.vueshop.order.constant.OrderConstant;
import com.flyduck.vueshop.order.entity.AppOrder;
import com.flyduck.vueshop.order.entity.AppOrderItem;
import com.flyduck.vueshop.order.entity.AppRefund;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * AdminRefundDetailsRespVO
 * </p>
 *
 * @author flyduck
 * @since 2024-06-13
 */
@Data
public class AdminRefundDetailsRespVO implements Serializable {

    private AppRefundVO refund;
    private AppOrderVO order;



    @Data
    public static class AppRefundVO extends AppRefund implements Serializable{
        private String refundStatusStr;

        public String getRefundStatusStr() {
            return OrderConstant.RefundStatus.fromCode(getRefundStatus()).getDescription();
        }
    }

    @Data
    public static class AppOrderVO extends AppOrder implements Serializable{
        private List<AppOrderItemVO> orderItems;
    }

    @Data
    public static class AppOrderItemVO extends AppOrderItem implements Serializable{
    }
}
